﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Xml.Xsl;

namespace Wicresoft.Task.ARNotice
{
    static class XmlUtil
    {
        public static string Transform(string xmlFile, string xsltFile)
        {
            XslCompiledTransform xsl = new XslCompiledTransform();
            StringBuilder buffer = new StringBuilder();

            using (StringWriter sw = new StringWriter(buffer))
            {
                xsl.Load(xsltFile);
                xsl.Transform(xmlFile, null, sw);
                return buffer.ToString();
            }
        }
    }
}
